<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        img:nth-child(1){
            width: 50px;
            height: 50px;
        }
        div{
            width: 50px;
            height: 50px; 
        }
        div:nth-of-type(1){
            background: url(img/apple50.jpg) no-repeat;
        }
        div:nth-of-type(2){
            background:rgb;
            background-size: 50px 50px;
        }
        
    </style>
</head>
<body>
    <img src="img/apple100.jpg" alt="">
    <img src="img/apple50.jpg" alt="">
    /* 背景图片 */
    <div>

    </div>

    <div>

    </div>
</body>
</html>